home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln0985.arc
/
RATZXREF.NOT
< prev
next >
Wrap
Text File
|
1986-02-27
|
4KB
|
64 lines
Pascal Cross-Reference Program
1. This program runs on (and came with) the Univ of Maryland Pascal
compiler for the UNIVAC 1100 series computer. I put the system up at
our site as a lunch-time project. I made some extensive changes to the
program to cure some problems and to remove some features I did not
like. It runs - both well and accurately - and should be easily
modifiable for any Pascal system. You should note that I retired the
whole system (since it was never intended for production) without
completing planned internal documentation, further clean-up, etc.
2. Notes:
a. Using Sperry terminology, this is a processor, not a program.
The difference is the ability to include a "command line" with the
call to a processor - thus one invokes it as: XREF,opt source .
Sperry system software automatically opens the "source" and makes
it available to the program - you may need to fiddle with this.
b. XREF allows one "option" in the processor call - an "N" will
suppress listing of the source - something I don't find handy (but
didn't get around to removing). See usage of variable "n-option",
and in particular the statement "n-option := 'N' in options" in the
procedure initialize. "options" is an automatically defined set
which includes all characters specified as options on the processor
call. You system may not have this capability, so you probably want
to just change the initialize statement to "n_options := false", or
pull out all related code.
c. XREF is written to put generated output straight to a
printer (actually, whatever you have as output). It is currently
set to use 132-columns. The source is printed in 88-columns - 80
for the actual source and the other 8-columns for line number, flags
and spacing. You can change this via constant "line_length". The
cross-ref portion prints to 132-columns. It requires 15-columns
for the identifier and spacing, and 6-columns for each reference.
You can change output width by changing constant "long_line" from
18 to a smaller number. For example: ( 80 - 15 ) / 6 = 10 refs per
line for 80-column paper.
d. XREF accepts an opening comment followed immediately by an
ampersand as a top-of-form command. It accepts either braces {} or
the standard (* *) for comments. It also is case-independent.
e. Output format: XREF is a minor "debugger" - while listing the
source, it will flag any comments or strings continued over one line
with a "C" or "S" respectively. Running XREF before a compile can
point out a forgotten closing comment/quote. In the cross-ref portion,
it flags declarations with a "*" and assignments (of value) with "=".
f. XREF uses 12-char for uniqueness - one can change that via
the constant "id_length" - although I never have, and do not know
of any side-effects of doing it.
g. One can easily add/delete reserved words - see the array
"rsvd_wd", the constants "xxx_key", etc. The "xxx_key" stuff is
a bit excessive - only a few are actually needed for program logic
and thus could be removed, but it makes it easier to add/chg/del
items from the list.
h. See constant "hash_max" - this is number of unique identifiers
XREF will handle - the value 1999 was sufficient to cross-ref the
entire compiler !!!!!
i. Also note the UNIVAC has a 36-bit word - you may have to (or
want to) fiddle with "fifteen_bit", "three_bit" and the records
("item" and "entries") to get this to work (or not eat up space).
3. Enjoy yourself !!!! Any comments or questions can be addressed
to me via this BBS.
John T. Ratzenberger